package com.java.tutorials.spring.timer;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created by xuzhike on 2016/1/30.
 */
@Component("annotationTask")
public class SchedulerAnnotation {
    @Scheduled(cron="0/1 * *  * * ? ")   //每5秒执行一次
    public void show(){
        System.out.println("进入测试 --- show");
    }

    public void print(){
        System.out.println("进入测试--- print");
    }
}
